package cn.stylefeng.guns.modular.account.mapper;

import cn.stylefeng.guns.modular.account.entity.Account;
import cn.stylefeng.guns.modular.account.model.params.AccountParam;
import cn.stylefeng.guns.modular.account.model.result.AccountResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 账户表 Mapper 接口
 * </p>
 *
 * @author liuqiang
 * @since 2020-02-10
 */
public interface AccountMapper extends BaseMapper<Account> {

    /**
     * 获取列表
     *
     * @author liuqiang
     * @Date 2020-02-10
     */
    List<AccountResult> customList(@Param("paramCondition") AccountParam paramCondition);

    /**
     * 获取map列表
     *
     * @author liuqiang
     * @Date 2020-02-10
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") AccountParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author liuqiang
     * @Date 2020-02-10
     */
    Page<AccountResult> customPageList(@Param("page") Page page, @Param("paramCondition") AccountParam paramCondition);


    /**
     * 需要提醒的
     *
     * @author liuqiang
     * @Date 2020-02-10
     */
    Page<AccountResult> remindPageList(@Param("page") Page page, @Param("paramCondition") AccountParam paramCondition);


    /**
     * 获取分页map列表
     *
     * @author liuqiang
     * @Date 2020-02-10
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") AccountParam paramCondition);


    AccountResult getByPhone(@Param("phone")String phone);

    void updateBalance(@Param("account") AccountResult account);
}
